package Utiles;

public class Chain {
	
	public static int nextChain(int theNumber){
		
		int res = 0;
		int ak = 0;
		for (int i = 0; theNumber > 0; i++) {
			
			ak = theNumber%10;
			ak *= ak;
			
			res += ak;
			theNumber /= 10;
		}
		
		return res;
	}
	
}
